import java.util.*;

class Solution {
    public int missingNumber(int[] nums) {
        int val = 0;
        for (int i = 0; i <= nums.length; i++) {
            val ^= i;
        }
        for (int i = 0; i < nums.length; i++) {
            val ^= nums[i];
        }
        return val;
    }
}

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        float h = scanner.nextFloat();//初始高度
        float n = scanner.nextInt();//落地次数
        float drop = 0;//下落的距离
        float bounce = 0;//弹起的距离
        float sum = 0.0f;//总距离
        for(int i=1;i<=n;i++){//小球下落次数
            //计算小球下落的距离
            drop += h ;
            //弹起的高度是下落的二分之一
            h /= 2;
            //计算它在第n次落地时共经过了多少米，
            //第n次落地，也就是n次下落 ,n-1次弹起
            //所以添加判断 当下落次数等于 i 的时候不加上弹起的距离
            if(i!=n){
                //计算小球弹起的距离
                bounce += h ;
            }
            //计算下落加上弹起的距离
            sum = drop + bounce;
        }
        //输出格式为：System.out.println(String.format("%.3f", h)+" "+String.format("%.3f", sum));
        System.out.println(String.format("%.3f", h)+" "+String.format("%.3f", sum));
    }

    public static void main3(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        scan.close();
        int count = 0;
        if (num <= 0) {
            System.out.println(num);
        }else {
            while(num > 0) {
                num /= 10;
                count++;
            }
            System.out.println(count);
        }
    }

    public static int getCM(int m, int n){
        //计算最小公倍数
        //m=3
        //n=2
        int max = m > n ? m : n;//最大值 - 3
        int min = m < n ? m : n;//最小值 - 2
        int i = 0;
        for(i = min;i <= min*max; i++){
            if(i % min == 0 && i % max == 0){//都等于0则说明为最小公倍数
                return i;
            }
        }
        return 0;
    }

    public static void main2(String[] args) {
        Scanner console = new Scanner(System.in);
        int m = console.nextInt();
        int n = console.nextInt();
        int result = getCM(m, n);
        System.out.println(result);
    }


    public static void main1(String[] args) {
        int count = 0;
        Boolean trueFlase = true;
        Scanner scanner = new Scanner(System.in);
        while (trueFlase) {
            if (scanner.nextInt() > 0) {
                count++;
            }else {
                trueFlase = false;
            }
        }
        System.out.println(count);

    }

}
